# - Find MPI
# This module looks for MPI (Message Passing Interface) support
# it will define the following values
#  MPI_INCLUDE_PATH = where mpi.h can be found
#  MPI_LIBRARY    = the library to link in (mpi mpich etc)

FIND_PATH(MPI_INCLUDE_PATH mpi.h
/usr/include/mpi/
)

FIND_PATH(MPI_LIBRARY_PATH
   NAMES libmpi.a libmpi.so
   PATHS /usr/lib/ #openmpi/lib
)

FIND_LIBRARY(MPI_LIBRARY
             NAMES mpi mpi++ 
             PATHS  /usr/lib #/openmpi/lib
)

SET(MPI_LIBRARIES ${MPI_LIBRARY} )
MARK_AS_ADVANCED(MPI_INCLUDE_PATH  MPI_LIBRARY )
